package com.example.administrator.commonlibrary.dagger.module;


import android.content.Context;

import com.example.administrator.commonlibrary.bean.DaoSession;
import com.example.administrator.commonlibrary.thirdparty.GreendaoConfig;
import com.example.administrator.commonlibrary.wholehelper.GreendaoHelper;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * 作者：wang_hong_wei
 * 创建时间：2018/9/7
 * 描述：全局单例的实例化
 */

@Module
public class OverallSituationModule {
    private Context context;
    public OverallSituationModule(Context context){
        this.context=context;
    }
    @Singleton
    @Provides
    GreendaoConfig provideGreendao(){
        return new GreendaoConfig();
    }
    @Singleton
    @Provides
    GreendaoHelper provideGreendaoHelper(GreendaoConfig config){
        return new GreendaoHelper(config);
    }


}
